﻿using SameGame.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SameGame.Presentation.Presenters
{
	internal class MainPresenter : IMainPresenter
	{
		private IMainView _mainView;
		private IBoard _board;

		public MainPresenter(IMainView mainView)
		{
			_mainView = mainView;
			_board = CBoardFactory.CreateBoard();
		}

		public IBoard Board
		{
			get
			{
				return _board;
			}
		}

		public void OnStartNewGame()
		{
			_board.Init(10, 10);
		}

		public IBoardScorePresenter CreateScorePresenter()
		{
			return new BoardScorePresenter(_board);
		}

		public IBoardBallsStatisticPresenter CreateBoardBallsStatisticPresenter()
		{
			return new BallBoardStatePresenter(_board);
		}

		public IBoardPresenter CreateBoardPresenter()
		{
			return new BoardPresenter(_board);
		}
	}
}
